#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <string.h>
#include <time.h>
#include "gmp.h" 
using namespace std;

//#define TEST_IN
#define TEST_OUT
#define STATIC_TABLE

int main(int argc, char *argv[])
{
    if (argc != 2)
           	return 1;

    unsigned int m, j, k, n1, n2;
    unsigned int* val;

    if (sscanf(argv[1], "%u-%u", &n1, &n2) != 2)
        return 1;

#ifdef TEST_IN

    scanf("%u %u %u", &j, &k, &m);

#else

/* wartosci na sztywno */

    m = 4294967295;

    j = 11;
    k = 16;

/* wartosci na sztywno */

#endif

#ifdef STATIC_TABLE
    val = new unsigned int[k+n2];
#else
    val = new unsigned int[k+1];
#endif

    srand(time(NULL));

    for (unsigned int i=0; i<k; i++)
    {
	    val[i] = rand();
    }

    for (unsigned int n=0; n<n2; n++)
    {
#ifdef STATIC_TABLE

        val[k+n] = (val[k+n-j] ^ val[n]);
        
        if (n >= n1-1)
        #ifdef TEST_OUT
            printf("%u/4294967296\n", val[k+n]);
        #else
            printf("%u\n", val[k+n]);
        #endif
        
#else

        val[k] = (val[k-j] ^ val[0]);
        
        if (n >= n1-1)
        #ifdef TEST_OUT
            printf("%u/%u\n", val[k], m);
        #else
            printf("%u\n", val[k]);
        #endif
        
        for (unsigned int i=0; i<k; i++)
            val[i] = val[i+1];
            
#endif
    }

    delete val;

    return 0;
}

